﻿using FluentNHibernate.Mapping;
using EntitiesAndMappings.Entities;

namespace EntitiesAndMappings.Mappings
{
    public class PeriodoMap: ClassMap<Periodo> 
    {
        public PeriodoMap()
        {
            Id(x => x.Id).GeneratedBy.Native();
            Map(x => x.Fecha).Unique().Not.Nullable();
            Map(x => x.Descripcion).Length(100).Not.Nullable();
            Map(x => x.Cerrado).Not.Nullable();
            Map(x => x.Estado).Length(1).Not.Nullable();
        }     


    }
}
